package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * jiang bai ping
 *
 * @Email 526666031@qq.com
 * @Detail 数据暂存
 */
@Data
@Alias("DataStaging")
@TableName(value = "data_staging")
@ApiModel(value = "数据暂存")
public class DataStaging extends BaseModel<DataStaging> implements Serializable {

    @ApiModelProperty(value = "主键id")
    @TableId(value = "`id`", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "用户id")
    @TableField(value = "`user_id`")
    private String userId;

    @ApiModelProperty(value = "公司id")
    @TableField(value = "`company_id`")
    private String companyId;

    @ApiModelProperty(value = "公司id")
    @TableField(value = "`project_id`")
    private String projectId;

    @ApiModelProperty(value = "前端key")
    @TableField(value = "`key`")
    private String key;

    @ApiModelProperty(value = "完整key")
    @TableField(value = "`full_key`")
    private String fullKey;

    @ApiModelProperty(value = "数据值")
    @TableField(value = "`value`")
    private String value;

    @ApiModelProperty(value = "是否已使用")
    @TableField(value = "`is_used`")
    private Boolean isUsed;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "`create_date_time`", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "`is_del`")
    private Boolean isDel;
}
